-
Notifications
You must be signed in to change notification settings - Fork 0
[CLEAN] Synthetic Benchmark PR #135875 - Allocation: introduce a new decider that balances the index shard count among nodes #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: base_pr_135875_20251204_3476
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Benchmark PR elastic#135875
Type: Clean (correct implementation)
Original PR Title: Allocation: introduce a new decider that balances the index shard count among nodes
Original PR Description: For a cluster with n data nodes to host an index with m shards, each node ideally should host not significantly more than m / n shards each. This new allocation decider acts on this principle to respond with a NOT_PREFERRED in event of a node being allocated more shards than threshold.
Nodes in shutdown are excluded when computing fair workload for nodes. A load skew tolerance setting is added to permit nodes to own more than ideal number of shards for the index.
Relates ES-12080
Original PR URL: elastic#135875
PR Type
Enhancement
Description
Introduce IndexBalanceAllocationDecider to balance index shard distribution
Add settings to control decider behavior with excess shard tolerance
Register new decider in cluster module allocation pipeline
Extend DiscoveryNodeFilters with hasFilters() utility method
Improve test infrastructure with shared assertion helper
Diagram Walkthrough
File Walkthrough
6 files
New allocation decider for index shard balancingRegister IndexBalanceAllocationDecider in allocation pipelineAdd hasFilters utility method to check filter presenceExpose getAllocation and make ProjectIndex record public for testingMake calculateNodeWeightWithIndex method public for testingExpose filter prefix constants for reuse by other deciders2 files
Settings for index balance decider configurationRegister IndexBalanceConstraintSettings in cluster settings4 files
Comprehensive test suite for index balance allocation deciderUpdate allocation decider order test to include new deciderUpdate test to use public calculateNodeWeightWithIndex methodAdd shared assertDecisionMatches helper for allocation tests1 files
Remove duplicate assertion helper moved to base test class